<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
  <head>
    <th:block th:replace="~{/_include/header}" />
    <title>[[${bundle.L('添加字段')}]]</title>
  </head>
  <body class="dialog">
    <div class="main-content">
      <form>
        <div class="form-group row">
          <label class="col-sm-3 col-form-label text-sm-right">[[${bundle.L('字段名称')}]]</label>
          <div class="col-sm-7">
            <input class="form-control form-control-sm" type="text" id="fieldLabel" maxlength="40" />
          </div>
        </div>
        <div class="form-group row">
          <label class="col-sm-3 col-form-label text-sm-right">[[${bundle.L('字段类型')}]]</label>
          <div class="col-sm-7">
            <select class="form-control form-control-sm" id="type">
              <option value="TEXT">[[${bundle.L('文本')}]]</option>
              <option value="NTEXT">[[${bundle.L('多行文本')}]]</option>
              <option value="PHONE">[[${bundle.L('电话')}]]</option>
              <option value="EMAIL">[[${bundle.L('邮箱')}]]</option>
              <option value="URL">[[${bundle.L('链接')}]]</option>
              <option value="NUMBER">[[${bundle.L('整数')}]]</option>
              <option value="DECIMAL">[[${bundle.L('货币')}]]</option>
              <option value="SERIES">[[${bundle.L('自动编号')}]]</option>
              <option value="DATE">[[${bundle.L('日期')}]]</option>
              <option value="DATETIME">[[${bundle.L('日期时间')}]]</option>
              <option value="PICKLIST">[[${bundle.L('下拉列表')}]]</option>
              <option value="CLASSIFICATION">[[${bundle.L('分类')}]]</option>
              <option value="MULTISELECT">[[${bundle.L('多选')}]]</option>
              <option value="REFERENCE">[[${bundle.L('引用')}]]</option>
              <option value="N2NREFERENCE">[[${bundle.L('多引用')}]]</option>
              <option value="FILE">[[${bundle.L('文件')}]]</option>
              <option value="IMAGE">[[${bundle.L('图片')}]]</option>
              <option value="AVATAR">[[${bundle.L('头像')}]]</option>
              <option value="BARCODE">[[${bundle.L('二维码')}]]</option>
              <option value="LOCATION">[[${bundle.L('位置')}]]</option>
              <option value="BOOL">[[${bundle.L('布尔')}]]</option>
              <optgroup th:label="${bundle.L('保留类型')}" class="bosskey-show">
                <option value="STATE">[[${bundle.L('状态')}]]</option>
              </optgroup>
            </select>
          </div>
        </div>
        <div class="form-group row hide J_dt-REFERENCE J_dt-N2NREFERENCE">
          <label class="col-sm-3 col-form-label text-sm-right">[[${bundle.L('选择引用实体')}]]</label>
          <div class="col-sm-7">
            <select class="form-control form-control-sm" id="refEntity"></select>
          </div>
        </div>
        <div class="form-group row hide J_dt-CLASSIFICATION">
          <label class="col-sm-3 col-form-label text-sm-right">[[${bundle.L('选择分类数据')}]]</label>
          <div class="col-sm-7">
            <select class="form-control form-control-sm" id="refClassification"></select>
          </div>
        </div>
        <div class="form-group row hide J_dt-STATE">
          <label class="col-sm-3 col-form-label text-sm-right">[[${bundle.L('状态类 (Enum)')}]]</label>
          <div class="col-sm-7">
            <input class="form-control form-control-sm" type="text" id="stateClass" placeholder="com.rebuild.core.support.state.HowtoState" />
          </div>
        </div>
        <div class="form-group row">
          <label class="col-sm-3 col-form-label text-sm-right">[[${bundle.L('备注')}]]</label>
          <div class="col-sm-7">
            <textarea class="form-control form-control-sm row2x" id="comments" maxlength="100" th:placeholder="${bundle.L('(选填)')}"></textarea>
          </div>
        </div>
        <div class="form-group row pb-1">
          <label class="col-sm-3 col-form-label text-sm-right"></label>
          <div class="col-sm-7">
            <label class="custom-control custom-control-sm custom-checkbox custom-control-inline mb-0">
              <input class="custom-control-input" type="checkbox" id="saveAndNew" />
              <span class="custom-control-label">[[${bundle.L('继续添加下一个')}]]</span>
            </label>
          </div>
        </div>
        <div class="form-group row footer">
          <div class="col-sm-7 offset-sm-3">
            <button class="btn btn-primary" type="button">[[${bundle.L('确定')}]]</button>
            <button class="btn btn-link" type="button" onclick="parent.RbModal.hide()">[[${bundle.L('取消')}]]</button>
          </div>
        </div>
      </form>
    </div>
    <th:block th:replace="~{/_include/footer}" />
    <script th:src="@{/assets/js/metadata/field-new.js}" type="text/babel"></script>
  </body>
</html>
